#define _CRT_SECURE_NO_WARNINGS
#include <stdlib.h>
int* smallerNumbersThanCurrent(int* nums, int numsSize)
{
	int* ans = (int*)malloc(numsSize*sizeof(int));
	for (int i = 0; i < numsSize; i++)
	{
		int count = 0;
		for (int j = 0; j < numsSize; j++)
		{
			if (nums[i] > nums[j])
			{
				count++;
			}
		}
		ans[i] = count;
	}
	return ans;
}
#include <stdio.h>
#include <string.h>
int main()
{
	int nums[30] = {0};
	int n;
	scanf("%d",&n);
	for (int i = 0;i<n;i++)
	{
		scanf("%d", &nums[i]);
	}
	int* bns = smallerNumbersThanCurrent(nums, n);
	for (int i = 0; i < n; i++)
	{
		printf("%d ", *(bns + i));
	}
	return 0;
}